home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / DIVERSEN / WINE02BX / REPLACE.ELC < prev    next >
Text File  |  1993-03-28  |  8KB  |  78 lines

  1. ;;; compiled by @win386 on Sat Mar 13 01:39:56 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/prim/replace.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (byte-code "└┴!¼é┬├─Mç" [boundp minibuffer-regexp-history nil delete-non-matching-lines keep-lines] 2)
  14. (fset 'keep-lines #[(regexp) "èn¼â└yê`m?¡╗┬ ─┼#¼å    d|ê¬ÿè╞öbê╞yê`)    W½à    |ê)è└yê`)m¼M╞ö╞òU½F└uê¬A*ç" [1 start re-search-forward regexp nil move 0 end] 4 "\
  15. Delete all lines except those containing matches for REGEXP.
  16. A match split across lines preserves all the lines it lies in.
  17. Applies to all lines after point." (byte-code "└┴┬├#Cç" [read-string "Keep lines (containing match for regexp): " nil minibuffer-regexp-history] 4)])
  18. (fset 'delete-matching-lines 'flush-lines)
  19. (fset 'flush-lines #[(regexp) "èm?¡Ö└    ┬├#¡Æè─öbê─yê`)┼yê`|ê¬c)ç" [re-search-forward regexp nil t 0 1] 4 "\
  20. Delete lines containing matches for REGEXP.
  21. If a match is split across lines, all the lines it lies in are deleted.
  22. Applies to lines after point." (byte-code "└┴┬├#Cç" [read-string "Flush lines (containing match for regexp): " nil minibuffer-regexp-history] 4)])
  23. (fset 'count-matches 'how-many)
  24. (fset 'how-many #[(regexp) "└┴èm¼ÿ`─┴╞#½Å\n`U½à╟uê¬j T¬e╚╔ \"+ç" [0 nil opoint count re-search-forward regexp t 1 message "%d occurrences"] 4 "\
  25. Print number of matches for REGEXP following point." (byte-code "└┴┬├#ç" [read-string "How many matches for (regexp): " nil minibuffer-regexp-history] 4)])
  26. (byte-code "└┴!¼é┬    ¼ë├ ─    ┼╞#ê└╟!¼â┬└╚!¼â┬└╔!¼â┬    └╩!¼â╦\n┬ç" [boundp occur-mode-map nil make-sparse-keymap define-key "" occur-mode-goto-occurrence occur-buffer occur-nlines occur-pos-list occur-last-string ""] 4)
  27. (fset 'occur-mode #[nil "└ ê┴\n!ê├┼╟╚!ê╟╔!ê╟╩!ç" [kill-all-local-variables use-local-map occur-mode-map occur-mode major-mode "Occur" mode-name make-local-variable occur-buffer occur-nlines occur-pos-list] 2 "\
  28. Major mode for output from \\[occur].
  29. Move point to one of the occurrences in this buffer,
  30. then use \\[occur-mode-goto-occurrence] to go to the same occurrence
  31. in the buffer that the occurrences were found in.
  32. \\{occur-mode-map}"])
  33. (fset 'occur-mode-goto-occurrence #[nil "½à┴!¼ê┬┬─┼!êè╞yê╟eè╞yê`)\"S╞W½å╔Z¬Å╞V½êë\\╔\\¬ü╩Ñ)ë 8 ═!ê╬ !b*ç" [occur-buffer buffer-name nil occur-pos-list error "Buffer in which occurrences were found is deleted" 0 count-lines occur-nlines 2 1 occur-number pos pop-to-buffer marker-position] 4 "\
  34. Go to the line this occurrence was found in, in the buffer it was found in." nil])
  35. (defvar list-matching-lines-default-context-lines 0 "\
  36. *Default number of context lines to include around a list-matching-lines
  37. match.  A negative number means to include that many lines before the match.
  38. A positive number means to include that many lines both before and after.")
  39. (defvar occur-whole-buffer nil "\
  40. If t, occur operates on whole buffer, otherwise occur starts from point.
  41. default is nil.")
  42. (fset 'list-matching-lines 'occur)
  43. (fset 'occur #[(regexp &optional nlines) "½à┴!¬ü\n├p─e    ¼Äè╩yê╦e`\"T`)╠Éèqê╬cê╧!ê╤╥!╙╘▒ê╒ ê╪)=½âdbêè    ½â┌ êdUä2█╪├#â2╩yê╦`\"\\`è╩W½â¬é[yê`)è╩V½åTyê¬â─yê`)▐▀\" ß GΓ\"#╪$èσ ë$`╪ôêqê$B¼êµ!¼âτcê╪Φ#êΘZ!ê╩W½ä[¬üë$╩V½æ#Ω▒ê─yê$Së$¬k Ω▒ê─yê$W½æ#Ω▒ê─yê$Të$¬k)─yê-é`qêƒt¡åδ∞G\")æ,ç" [nlines prefix-numeric-value list-matching-lines-default-context-lines t 1 prevpos linenum buffer first occur-whole-buffer 0 count-lines "*Occur*" standard-output "Lines matching " prin1 regexp " in buffer " buffer-name 46 10 occur-mode occur-buffer occur-nlines nil occur-pos-list beginning-of-buffer re-search-forward start end format "%3d" tag make-string 32 empty tem make-marker zerop "--------\n" insert-buffer-substring backward-char 58 message "%d matching lines."] 6 "\
  44. Show lines containing a match for REGEXP.  If the global variable
  45. occur-whole-buffer is non-nil, the entire buffer is searched, otherwise
  46. search begins at point.  Interactively, REGEXP defaults to the last REGEXP
  47. used interactively.
  48.  
  49. Each line is displayed with NLINES lines before and after,
  50. or -NLINES before if NLINES is negative.
  51. NLINES defaults to list-matching-lines-default-context-lines.
  52. Interactively it is the prefix arg.
  53.  
  54. The lines are shown in a buffer named *Occur*.
  55. It serves as a menu to find any of the occurrences in this buffer.
  56. \\[describe-mode] in that buffer will explain how." (byte-code "└┴\n├#ë Dç" [read-string "List lines matching regexp: " occur-last-string minibuffer-regexp-history current-prefix-arg] 4)])
  57. (defconst query-replace-help "Type Space or `y' to replace one match, Delete or `n' to skip to next,\nESC or `q' to exit, Period to replace one match and exit,\nComma to replace but not move point immediately,\nC-r to enter recursive edit (\\[exit-recursive-edit] to get out again),\nC-w to delete match and recursive edit,\nC-l to clear the screen, redisplay, and offer same replacement again,\n! to replace all remaining matches with no more questions,\n^ to move point back to previous match." "\
  58. Help message while in query-replace")
  59. (byte-code "└┴┬\"ê├─Mç" [autoload isearch-highlight "isearch" perform-replace-next-event #[(event) "½ò┴├Ä└─ö─ò\"ê┼!ê╟ë*ç┼!ç" [isearch-highlight t aborted ((isearch-dehighlight aborted)) 0 next-command-event event nil] 3]] 3)
  60. (fset 'perform-replace #[(from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count) "└┴ \n¡ç ¡ä ëùÿ??½â╞¬ü╟ └╚╔└╚ë└\n  ;½å¬ç¼â┘½æ╞█½â ¬â▄ !█Q▌ ê▐ êâYmäY└╔#âY\n`=½î┘uê└╔#¬ü╔âY<½₧  U½ù \\ 8TGª¼æα#ê T éS▐ ê└ë!\"\"ä5π Σ%&'º½ç'U½»ΦΘ #êΩ!êδ!«é뺽Z∞U½Tφ'┴ \".'ë¬G∩&!ê*≡U¼å±U½ë└╔ë\"¬≥U½ó@ë3@bê3A╔=ë!¼å∩3A!êA)é╨⌠U¼å⌡U½û!¼ëα#ê╔\"╔!é╨÷U½Ö!¼ëα#ê└╔\"╔!é╨≈U½ö!ä╨α#ê╔!é╨°U½Ö!¼ëα#ê╔\"└╔!é╨∙U¼å·U½ç╔ë\"é╥√U½çⁿ└!êé╨²U½ì∩π è■ ê)!êé╨ U½û╚ö╚ò|ê∩π è■ ê)!ê╔!é╨└.╔ë\"â╒`!«ëü@üAπ \"BB!½à T *`\néf¡é.ç" [nil allocate-event case-fold-search case-replace from-string regexp-flag re-search-forward search-forward 0 t lastrepl replace-count next-rotate-count stack keep-going replacement-index next-replacement search-string search-function literal nocasify event char replacements repeat-count 1 delimited-flag "\\b" regexp-quote push-mark undo-boundary query-flag replace-match replaced done match-data (concat "Query replacing " (if regexp-flag "regexp " "") from-string " with " next-replacement ".\n\n" (substitute-command-keys query-replace-help)) help-form data help-char message "Query replacing %s with %s: " perform-replace-next-event event-to-character 63 character-to-event unread-command-event store-match-data 27 113 94 elt 32 121 46 44 33 127 110 12 recenter 18 recursive-edit 23 mapcar #[(elt) "└    !½ä┬    !ç    ç" [markerp elt marker-position] 2]] 14 "\
  61. Subroutine of `query-replace'.  Its complexity handles interactive queries.
  62. Don't use this in your own program unless you want to query and set the mark
  63. just as `query-replace' does.  Instead, write a simple loop like this:
  64.   (while (re-search-forward \"foo[     ]+bar\" nil t)
  65.     (replace-match \"foobar\" nil nil))
  66. which will run faster and do exactly what you probably want."])
  67. (fset 'map-query-replace-regexp #[(regexp to-strings &optional arg) "└\n<½ä\n¬»\nG├U¼⌐─┼\n\"½ÿ╞    \n├─┼\n\"OC\"\n─┼\n\"T└Oë¬]╞    \nC\"╟ë¬R╚        ╩ë└ &ê)╠═!ç" [nil replacements to-strings 0 string-match " " append "" perform-replace regexp t arg message "Done"] 8 "\
  68. Replace some matches for REGEXP with various strings, in rotation.
  69. The second argument TO-STRINGS contains the replacement strings, separated
  70. by spaces.  This command works like `query-replace-regexp' except
  71. that each successive replacement uses the next successive replacement string,
  72. wrapping around from the last such string to the first.
  73.  
  74. Non-interactively, TO-STRINGS may be a list of replacement strings.
  75.  
  76. A prefix argument N says to use each replacement string N times
  77. before rotating to the next." "sMap query replace (regexp): \nsQuery replace %s with (space-separated strings): \nP"])
  78.